/*
 * @Author: 耿远风
 * @Date: 2020-07-15 00:24:32
 * @LastEditors: 耿远风
 * @LastEditTime: 2020-10-16 15:50:46
 * @Description: 
 */
import { globalError } from 'src/base/interceptors/httpResult.interceptor';
import { User } from './user.entity';
import { Injectable } from '@nestjs/common';
import { LockService } from './../../base/services/lock.service';
@Injectable()
export class UserService {
    constructor(private readonly lockService: LockService) {}
    async adminLogin(phone,passWord) {
      let people = await User.findOne({phone,passWord});
      if (!people) {
          globalError('无此用户');
      }
      return people;
    }
}
